package design.ObserverPattern;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * Created by looper on 2017/8/19.
 */
public class ObserverTest {
  public static void main(String[] args) {
    WeixinUser zhongyong = new WeixinUser("仲永");

    WeixinUser jiaziya = new WeixinUser("姜子牙");

    WeixinUser kenglu = new WeixinUser("坑露");

    Subject subject = new ConcreteSubject();

    subject.add(zhongyong);
    subject.add(jiaziya);
    subject.add(kenglu);

    String information = "您更新的拜托了钱包微信公众号更新了新内容.";
    subject.notifyUser(information);


    List list = new ArrayList<>();
    Iterator iterator = list.iterator();

    while(iterator.hasNext()){

    }
  }
}
